package com.definity.toolkit.message;

import com.definity.toolkit.i18n.I18n;
import com.definity.toolkit.i18n.I18nFactory;

public class I18nMessage extends Message {

	private I18n i18n = I18nFactory.create("messages");
	
	public I18nMessage(String messageKey, Object... parameters) {
		this(messageKey, MessageType.INFO, parameters);
	}

	public I18nMessage(String messageKey, MessageType messageType, Object... parameters) {
		setMessage(String.format(i18n.tl(messageKey), parameters));
		setMessageType(messageType);
	}
	
}
